// Copyright (C) Microsoft Corporation. All rights reserved.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;


namespace Microsoft.DDSolutions.UI
{
    public class GradientPanel : Panel
    {

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            Rectangle hline;
            LinearGradientBrush hlinebr;

            hline = new Rectangle(0, 0, this.Height, this.Width);
            hlinebr = new LinearGradientBrush(hline, Color.White, Color.FromArgb(71, 94, 148), LinearGradientMode.ForwardDiagonal);

            e.Graphics.CompositingQuality = CompositingQuality.HighQuality;
            e.Graphics.SmoothingMode = SmoothingMode.HighQuality;

            e.Graphics.FillRectangle(hlinebr, this.DisplayRectangle);

        }
    }
}
